<?php
/**
 * Description of model_exercises
 *
 * @author Steffen Bilde
 */
class model_exercises extends CI_Model
{
    function  __construct()
    {
        parent::__construct();
    }

    //List all exercises from'exercises'table
    function listAllExercises()
    {
        $data = array();
        $this->db->order_by('exercise_name','asc');
        $Q = $this->db->get('exercises');

        if ($Q->num_rows() > 0)
        {
            foreach ($Q->result() as $row)
            {
                $data[] = $row;
            }
        }
        $Q->free_result();
        return $data;
    }
}
?>
